<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>订单列表</title>
		<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="yes" name="apple-touch-fullscreen">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no,email=no" name="format-detection">
		<!--[if lt IE 9]> 
		<script src=http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> 
		<![endif]-->
		<script type="text/javascript" src="../js/init.js"></script>
		<!--<link rel="stylesheet" type="text/css" href="css/home.css" />-->
		<link rel="stylesheet" type="text/css" href="../css/common.css" />
		<link rel="icon" href="../images/favicon.ico" />
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
		   #T {
				position: relative;
				height: 1.06rem;
				border-bottom: 0.1rem solid rgb(242, 242, 242);
				font-size: 0.3rem;
				margin: 0 0.20rem;
			}
			
			 #T text {
				margin: 0 14%;
				font-size: 0.3rem;
				height: 1rem;
				line-height: 1rem;
				display: inline-block;
				width: 20%;
				text-align: center;
				position: absolute;
			}
			
			#T #left {
				left: 0rem;
			}
			
			 #T #right {
				right: 0rem;
			}
			
		
		
			
			#C .Cc:nth-child(2) {
				display: none;
			}
			/*#T .clear {
				clear: both;
				display: block;
			}*/
			#C .Cc .contain {
				font-size: 0.3rem;
				position: relative;
				border-bottom:1px solid #ebebeb;
				padding: 0.2rem 0;
			}
			#C .Cc .contain img {
				width: 1.3rem;
				height: 1.3rem;
				border-radius: 50%;
				position: absolute;
				left: 0.3rem;
				top: 0.2rem;
			}
			#C .Cc .contain .Name {
				padding-left: 1.7rem;
				display: block;
				line-height: 0.62rem;
			}
			#C .Cc .contain .time {
				padding-left:1.7rem;
				display: block;
				line-height: 0.62rem;
			}
			#C .Cc .contain .price {
				font-weight: 700;
				position: absolute;
				right: 0.3rem;
				top: 0.3rem;
				color: #f00;
			}
			#C .Cc .contain .status {
				position: absolute;
				right: 0.3rem;
				top: 0.9rem;
			}
			.active {
				color: #ae4b78;
				border-bottom: 0.06rem solid #ae4b78;
			}
		</style>
	</head>
	<body>
		<div id="T">
			<text id="left" class="active">待支付</text>
			<text id="right" class="">已支付</text>
			<!--<text class="clear"></text>-->
		</div>
		<div id="C">
			<div class="Cc left">
				<div class="contain">
					<img src="../images/2.jpg"/>
					<text class="Name">虹桥阁主题餐厅</text>
					<text class="time">2017-06-10 9：00</text>
					<text class="status">待支付</text>
					<text class="price">￥200</text>
				</div>
				<div class="contain">
					<img src="../images/2.jpg"/>
					<text class="Name">虹桥阁主题餐厅</text>
					<text class="time">2017-06-10 9：00</text>
					<text class="status">待支付</text>
					<text class="price">￥200</text>
				</div>
			</div>
			<div class="Cc right">
				<div class="contain">
					<img src="../images/2.jpg"/>
					<text class="Name">虹桥阁主题餐厅</text>
					<text class="time">2017-06-10 9：00</text>
					<text class="status">待支付</text>
					<text class="price">￥200222</text>
				</div>
				<div class="contain">
					<img src="../images/2.jpg"/>
					<text class="Name">虹桥阁主题餐厅</text>
					<text class="time">2017-06-10 9：00</text>
					<text class="status">待支付</text>
					<text class="price">￥20222</text>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
				var btns = document.getElementById("T").getElementsByTagName("text");
				var divs = document.getElementById("C").getElementsByClassName("Cc");
				for(var i = 0; i < btns.length; i++) {
					btns[i].index = i; //自定义属性，用于关联下面的大盒子
					btns[i].onclick = function() {

						for(var j = 0; j < btns.length; j++) {
							//把所有的button清空类名
							btns[j].className = "";
						}
						//点击的那个盒子添加指定类名
						this.className = "active";
						for(var i = 0; i < divs.length; i++) {
							//先让底下的div全部隐藏
							divs[i].style.display = "none";
						}
						//然后给当前所点击按钮相关联的盒子添加指定属性
						divs[this.index].style.display = "block";
					}
				}
//		var htmlL = '';
//		for (var i = 0;i < 5;i++) {
//			htmlL += '<div class="contain">'+
//					'<img src="../images/2.jpg"/>'+
//					'<text class="Name">虹桥阁主题餐厅</text>'+
//					'<text class="time">2017-06-10 9：00</text>'+
//					'<text class="status">待支付</text>'+
//					'<text class="price">￥200</text>'+
//				'</div>'
//		}
//		$("#C .left").html(htmlL);
	</script>
</html>
